<template>
  <div>
    <el-dialog :visible.sync="open" width="800px" append-to-body>
      <el-table v-loading="loading" :data="orUserList">
        <el-table-column label="客户名称" prop="customName"  width="150"/>
        <el-table-column label="客户手机号" prop="customPhone" :show-overflow-tooltip="true" width="150"/>
        <el-table-column label="操作记录" prop="type" :show-overflow-tooltip="true" width="150">
          <template slot-scope="scope">
            <span v-if="scope.row.type===0">新增</span>
            <span v-else-if="scope.row.type===1">修改</span>
            <span v-else-if="scope.row.type===2">删除</span>
          </template>
        </el-table-column>
        <el-table-column label="公司名称" prop="deptName"  :show-overflow-tooltip="true" width="150">
        </el-table-column>
        <el-table-column label="创建时间" align="center" prop="createTime" width="150">
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
      </el-table>
    </el-dialog>
  </div>
</template>

<script>
import{listIotUser} from "@/api/system/oruser"
export default {
  name: 'OrUser',
  props:['params'],
  data(){
    return{
      open:false,
      orUserDetail:null,
      title:"",
      orUserList:[]
    }
  },
  methods:{
    showDetailOr(){
      this.loading = true
      this.open=true
      this.orUserDetail=this.params
      listIotUser(this.orUserDetail).then(res=>{
        this.orUserList=res.rows
      })
      this.loading = false
    },
  },
  created() {
  }
}
</script>

<style scoped>

</style>
